package com.rubiksillusions;

public class LayerByLayerAlgorithm extends Algorithm {
	
	public String execute(RubiksCube rubiksCube) {
		new MakeCrossAlgorithm().execute(rubiksCube);
		new PositionThreeCornersOfFirstLayerAlgorithm().execute(rubiksCube);
		new PositionThreeEdgesOfSecondLayerAlgorithm().execute(rubiksCube);
		new PositionLastCornersOfFirstLayerAlgorithm().execute(rubiksCube);
		rubiksCube.executeMovesList("X2 Z ", true);
		new PositionLastEdgeOfSecondLayerAlgorithm().execute(rubiksCube);
		new OrientationOfLastLayerEdgesAlgorithm().execute(rubiksCube);
		new PositionOfLastLayerEdgesAlgorithm().execute(rubiksCube);
		new PositionOfLastLayerCornersAlgorithm().execute(rubiksCube);
		new OrientationOfLastLayerCornersAlgorithm().execute(rubiksCube);
		return rubiksCube.getExecutedMovesList(true);
	}
}
